package com.lsh.oms.core.enums;

/**
 *
 * @author huangdong
 * @date 16/8/1
 */
public enum ReturnStatus {
	/**
	 *
	 */
	Applying(1, "返仓申请中"),
	Waiting_Confirm_So(2, "待确认SO"),
	Waiting_Submit_So(3, "待提交SO"),
	Submit_Success_So(4, "提交SO成功"),
	Return_Success(5, "返仓完成"),
	Submiting_So(6, "提交SO中"),
	Submit_Fail_So(7, "提交SO失败");

	private final int index;
	private final String name;

	ReturnStatus(int index, String name) {
		this.index = index;
		this.name = name;
	}

	public static String getName(int index) {
		for (ReturnStatus c : ReturnStatus.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}

	public int getIndex() {
		return index;
	}

	public String getName() {
		return name;
	}
}
